package test.run;

import java.util.Calendar;

import test.check.system.CheckSystem;

public class CheckSystemThread implements Runnable {

	@Override
	public void run() {
		String currentDateTime = null;
		
		Calendar ca = Calendar.getInstance();
		int year = ca.get(Calendar.YEAR);
		int month = ca.get(Calendar.MONTH) + 1;
		int day = ca.get(Calendar.DAY_OF_MONTH);
		
		int hour = ca.get(Calendar.HOUR_OF_DAY);
		int min = ca.get(Calendar.MINUTE);
		int sec = ca.get(Calendar.SECOND);
		
		StringBuilder sb = new StringBuilder();
		sb.append(year).append("-").append(month).append("-").append(day);
		currentDateTime = sb.append("_").append(hour).append(":").append(min).append(":").append(sec).toString();
		
		System.out.println("System Check Time : " + currentDateTime);
		
		CheckSystem cs = new CheckSystem();
		cs.checkNetwork();
		cs.checkServerProcess();
		cs.checkStorageAvailablity();
	}

}
